package registry

import "wf-deploy-agent/registry/entity"

// Registry 注册中心接口
type Registry interface {
	Prepare()
	Register(key string, data []byte, flags ...int32) error
	Unregister(key string) error
}

type Discovery interface {
	Fetch()
	GetCatalog() ([]string, error)
	GetService(name string) ([]*registry.ServiceInstance, error)
	GetInstance(name string) (*registry.ServiceInstance, error)
	GetOrientedInstance(name, routingKey string) (*registry.ServiceInstance, error)
	Monitor()
}
